<!doctype html>
<html lang="en">
  <head>
    <meta charset="{{ config['server']['encoding'] }}">
    <title>{% block title %}{{ config['metadata:main']['identification_title'] }} -{% endblock %}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="language" content="{{ config['server']['language'] }}">
    <meta name="description" content="{{ config['metadata:main']['identification_title'] }}">
    <meta name="keywords" content="{{ config['metadata:main']['identification_keywords'] }}">
    <link rel="shortcut icon" href="{{ config['server']['url'] }}/static/favicon.ico" type="image/x-icon">
    {% for link in data['links'] %}
      <link rel="{{ link['rel'] }}" type="{{ link['type'] }}" title="{{ link['title'] }}" href="{{ link['href'] }}"/>
      {% if (link['rel']=="self" and link['type']=="text/html") %}
      <link rel="canonical" href="{{ link['href'].split('?')[0] }}" />
      {% endif %}
    {% endfor %}

    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js" integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf" crossorigin="anonymous"></script>

    {% block extrahead %}
    {% endblock %}
  </head>
  <body>
    <header>
    <div class="container">
      <div class="col-sm-12 col-md-10 col-md-offset-1">
        <a title="pycsw website" href="https://pycsw.org"><img class="header-img" src="https://pycsw.org/img/pycsw-logo-vertical.png" alt="pycsw website" title="pycsw website" height="100"/></a>
      <h1>{{ config['metadata:main']['identification_title'] }}</h1>
      </div>
    </div>
    </header>
    <div class="container" style="">
      <div class="col-sm-12 col-md-10 col-md-offset-1" style="background-color: #cee8f9;">
        <div class="d-flex bd-highlight">
          <div class="p-2 w-75 bd-highlight">
          {% block crumbs %}
          <a href="{{ config['server']['url'] }}">Home</a>
          {% endblock %}
          </div>
          <div class="p-2 flex-shrink-1 bd-highlight">
          {% set links_found = namespace(json=0) %}

          {% for link in data['links'] %}
            {% if link['rel'] == 'alternate' and link['type'] and link['type'] in ['application/json', 'application/geo+json'] %}
              {% set links_found.json = 1 %}
              <a href="{{ link['href'] }}">JSON</a>
            {% endif %}
          {% endfor %}

          {% if links_found.json == 0 %}
            <a href="?f=json">JSON</a>
          {% endif %}
          | <a href="mailto:{{ config['metadata:main']['contact_email'] }}">Contact</a>
          </div>
        </div>
      </div>
    </div>
    <hr>
    <main>
      <div class="container">
        <div class="row w-75">
          <div>
            <br/>
            {% block body %}
            {% endblock %}
          </div>
        </div>
      </div>
      <hr>
    </main>
    <footer class="sticky">Powered by <a title="pycsw" href="https://pycsw.org"><img src="{{ config['server']['url'] }}/static/logo-horizontal.png" title="pycsw logo" style="height:24px;vertical-align: middle;"/></a> {{ version }}</footer>
    {% block extrafoot %}
    {% endblock %}
  </body>
</html>
